 |
|
|
|
|
Working with Loops |
|
|
|
| |
 |
|
|
|
|
For Loops |
|
|
|
| |
 |
|
|
|
|
Do Loops |
|
|
|
| |
 |
|
|
|
|
Enumeration Loops |
|
|
|
| |
 |
|
|
|
|
Debugging Your Programs |
|
|
|
| |
 |
|
|
|
|
Stepping Through Your Code |
|
|
|
| |
 |
|
|
|
|
Working in the Immediate Window |
|
|
|
| |
 |
|
|
|
|
Tracking Variable Values |
|
|
|
| |
 |
|
|
|
|
Error Trapping |
|
|
|
| |
 |
|
|
|
|
Using the On Error Statement |
|
|
|
| |
 |
|
|
|
|
Labeling Code Lines |
|
|
|
| |
 |
|
|
|
|
Controlling Program Flow After an Error |
|
|
|
| |
 |
|
|
|
|
Determining the Type of Error |
|
|
|
| |
 |
|
|
|
|
From Here . . . |
|
|
|
| |
|
|
|
|
|
11
Managing Your Project: Sub Procedures, Functions, and Multiple Forms |
|
|
|
| |
 |
|
|
|
|
Using Procedures and Functions |
|
|
|
| |
 |
|
|
|
|
Working with Procedures |
|
|
|
| |
 |
|
|
|
|
Working with Functions |
|
|
|
| |
 |
|
|
|
|
Determining the Scope of Procedures and Functions |
|
|
|
| |
 |
|
|
|
|
Reusing Functions and Procedures |
|
|
|
| |
 |
|
|
|
|
Working with Multiple Forms |
|
|
|
| |
 |
|
|
|
|
Adding New Forms to Your Program |
|
|
|
| |
 |
|
|
|
|
Adding Code Modules to a Project |
|
|
|
| |
 |
|
|
|
|
Accessing the Forms and Modules of a Project |
|
|
|
| |
 |
|
|
|
|
Managing Components in Your Project |
|
|
|
| |
 |
|
|
|
|
Managing Program References |
|
|
|
| |
 |
|
|
|
|
Controlling Your Controls |
|
|
|
| |
 |
|
|
|
|
Adding Forms, Modules, and Classes to the Project |
|
|
|
| |
 |
|
|
|
|
Removing Pieces |
|
|
|
| |
 |
|
|
|
|
Controlling How Your Program Starts |
|
|
|
| |
 |
|
|
|
|
Setting the Startup Form |
|
|
|
| |
 |
|
|
|
|
Using Sub Main |
|
|
|
| |
 |
|
|
|
|
From Here . . . |
|
|
|
| |
|
|
|
|
|
III
Visual Basic Program Components |
|
|
|
| |
|
|
|
|
|
12
Microsoft Common Controls |
|
|
|
| |
 |
|
|
|
|
Introduction to the Common Controls |
|
|
|
| |
 |
|
|
|
|
The ImageList: A Fundamental Common Control |
|
|
|
| |
 |
|
|
|
|
Setting Up an ImageList at Designtime |
|
|
|
| |
 |
|
|
|
|
Setting Up an ImageList with Code |
|
|
|
| |
 |
|
|
|
|
Organizing Your Data |
|
|
|
| |
 |
|
|
|
|
Using the ListView Control |
|
|
|
| |
 |
|
|
|
|
Using the TreeView Control |
|
|
|
| |
 |
|
|
|
|
Using the TabStrip Control |
|
|
|
| |
 |
|
|
|
|
Accepting User Input |
|
|
|
| |
 |
|
|
|
|
Using an ImageCombo Control |
|
|
|
| |
 |
|
|
|
|
The UpDown Control |
|
|
|
| |
 |
|
|
|
|
Working with Dates |
|
|
|
| |
 |
|
|
|
|
Sliding into Numbers |
|
|
|
| |
 |
|
|
|
|
Reporting Status and Progress |
|
|
|
| |
 |
|
|
|
|
Adding a Status Bar to Your Program |
|
|
|
| |
 |
|
|
|
|
Progress Bar |
|
|
|
| |
 |
|
|
|
|
Adding Video with the Animation Control |
|
|
|
| |
 |
|
|
|
|
From Here . . . |
|
|
|
| |
|
|
|
|
|
13
Working with Control Arrays |
|
|
|
| |
 |
|
|
|
|
Introducing Control Arrays |
|
|
|
| |
 |
|
|
|
|
Control Array Elements |
|
|
|
| |
 |
|
|
|
|
Understanding the Advantages of Control Arrays |
|
|
|
| |
 |
|
|
|
|
Creating a Control Array |
|
|
|
| |
 |
|
|
|
|
Adding Control Arrays to a Form |
|
|
|
| |
 |
|
|
|
|
Writing Code for a Control Array |
|
|
|
| |
 |
|
|
|
|
Removing Elements from a Control Array |
|
|
|
| |
 |
|
|
|
|
Working with Control Arrays |
|
|
|
| |
 |
|
|
|
|
Using a Control Array in Your Programs |
|
|
|
| |